\(\int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx\) [67]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 4 \[ \int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx=\log (2+x) \]

[Out]

ln(2+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1600, 31} \[ \int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx=\log (x+2) \]

[In]

Int[(2 - x - 2*x^2 + x^3)/(4 - 5*x^2 + x^4),x]

[Out]

Log[2 + x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{2+x} \, dx \\ & = \log (2+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00 \[ \int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx=\log (2+x) \]

[In]

Integrate[(2 - x - 2*x^2 + x^3)/(4 - 5*x^2 + x^4),x]

[Out]

Log[2 + x]

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.25

method result size
default \(\ln \left (x +2\right )\) \(5\)
norman \(\ln \left (x +2\right )\) \(5\)
risch \(\ln \left (x +2\right )\) \(5\)
parallelrisch \(\ln \left (x +2\right )\) \(5\)

[In]

int((x^3-2*x^2-x+2)/(x^4-5*x^2+4),x,method=_RETURNVERBOSE)

[Out]

ln(x+2)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00 \[ \int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx=\log \left (x + 2\right ) \]

[In]

integrate((x^3-2*x^2-x+2)/(x^4-5*x^2+4),x, algorithm="fricas")

[Out]

log(x + 2)

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 3, normalized size of antiderivative = 0.75 \[ \int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx=\log {\left (x + 2 \right )} \]

[In]

integrate((x**3-2*x**2-x+2)/(x**4-5*x**2+4),x)

[Out]

log(x + 2)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00 \[ \int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx=\log \left (x + 2\right ) \]

[In]

integrate((x^3-2*x^2-x+2)/(x^4-5*x^2+4),x, algorithm="maxima")

[Out]

log(x + 2)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.25 \[ \int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx=\log \left ({\left | x + 2 \right |}\right ) \]

[In]

integrate((x^3-2*x^2-x+2)/(x^4-5*x^2+4),x, algorithm="giac")

[Out]

log(abs(x + 2))

Mupad [B] (verification not implemented)

Time = 0.01 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00 \[ \int \frac {2-x-2 x^2+x^3}{4-5 x^2+x^4} \, dx=\ln \left (x+2\right ) \]

[In]

int(-(x + 2*x^2 - x^3 - 2)/(x^4 - 5*x^2 + 4),x)

[Out]

log(x + 2)